#实现一个简易的银行操作系统

user_pass = {"zhangsan":"123456",
             "lisi":"654321",
             "wangwu":"123"
            }

user_money ={"zhangsan":"4000.8",
             "lisi":"689.89",
             "wangwu":"390"
            }

print("="*10,"BankingSystem_login","="*10)
print("="*41)
user = input("请输入用户名 ")
password = input("请输入密码 ")

uni=list()
for i,j in user_pass.items(): #把字典里的数据遍历出来
       uni.append(i+j) #把遍历出来的数据封装在一个UNI的列表里

usermoney = user_money[user]
if user+str(password) in uni:  #对手动输入的数据做一个判断
    print("="*13,"BankingSystem","="*13)
    print("="*41)
    print("{0:^4} {1:^15} {2:^10}".format(" ","1.余额","2.存钱"))
    print("{0:^4} {1:^15} {2:^10}".format(" ","3.取钱","4.退出"))
    print("="*41)
    count = input("请输入相应的数字 ")


    if count == "1":
        print("你的账户余额为：{}元".format(usermoney))

    elif count == "2":
        money = input("请输入你的存钱金额 ")
        money =float(money)+float(usermoney)
        print("你的账户余额为：{}元".format(money))

    elif count == "3":
        money = input("请输入你的取钱金额 ")
        if float(money) > float(usermoney):
            print("余额不足")
        else:
            money = float(usermoney)-float(money)
            print("你的账户余额为：{}元".format(money))
            print("任意键继续")
    elif count == "4":
        print("欢迎下次再来")



else:

    print("用户或者密码不正确")